/*
 * Data Mashup Canonical Model. A canonical model for representing data mashups
 * Copyright (C) 2011 Carlos Rodriguez
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
 */

package eu.ict_omelette.mashup.canonicalmodel;

import java.io.Serializable;

/**
 *
 * @author carlos
 */
public class Dataflow implements Serializable {
    
    private Component fromComponent;
    private Component toComponent;

    private String fromPortName;
    private String toPortName;

    /**
     * @return the fromPort
     */
    public String getFromPort() {
        return this.fromPortName;
    }

    /**
     * @param fromPort the fromPort to set
     */
    public void setFromPort(Component fromComponent, String outputPortName) {
        this.fromComponent = fromComponent;
        this.fromPortName = outputPortName;
    }

    /**
     * @return the toPort
     */
    public String getToPort() {
        return this.toPortName;
    }

    /**
     * @param toPort the toPort to set
     */
    public void setToPort(Component toComponent, String inputPortName) {
        this.toComponent = toComponent;
        this.toPortName = inputPortName;
    }

    public Component getFromComponent(){
        return this.fromComponent;
    }

    public Component getToComponent(){
        return this.toComponent;
    }
    
}
